package com.valuegroup.smarttodo.data.vo;

import com.valuegroup.smarttodo.data.model.Event;
import com.valuegroup.smarttodo.plugins.pickdialog.DateUtils;

import java.io.Serializable;

public class GoalsEventVo implements Serializable {

    private Long id;
    private Long gid;
    private String scheduDt;
    private String title;
    private Boolean finish;

    public static GoalsEventVo convertEvent(Event t) {
        GoalsEventVo v = new GoalsEventVo();
        v.setTitle(t.getTitle());
        v.setId(t.getId());
        v.setGid(t.getSourceId());
        v.setFinish(t.getFinish());
        if (t.getJoinSchedule() && t.getScheduleDt() != null) {
            v.setScheduDt(DateUtils.date2str(t.getScheduleDt(), DateUtils.F31));
        }
        return v;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getGid() {
        return gid;
    }

    public void setGid(Long gid) {
        this.gid = gid;
    }

    public Boolean getFinish() {
        return finish;
    }

    public void setFinish(Boolean finish) {
        this.finish = finish;
    }

    public String getScheduDt() {
        return scheduDt;
    }

    public void setScheduDt(String scheduDt) {
        this.scheduDt = scheduDt;
    }
}
